/**
 * Created by liuqingling on 16/6/13.
 */
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config.js');
//config.entry.app.unshift("webpack-dev-server/client?http://localhost:3000/", "webpack/hot/dev-server");
var server = new WebpackDevServer(webpack(config), {
    quiet: false,
    contentBase: __dirname,
    hot: true,

    //    "User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"},
    stats: { colors: true },
    publicPath: "/",
    noInfo: false,
    compress: true,
    //proxy: {
    //    "/token/*": {
    //        target: '"http://h5.api.esn.ren:6061/',
    //        secure: false,
    //    },
    //    "/diary/*":{
    //        target: '"http://h5.api.esn.ren:6061/',
    //        secure: false,
    //    }
    //    //'/api/*':'http://localhost:3000/'
    //},
    //headers: { "Host": "h5.api.esn.ren:6061"},
});
server.app.get('/static',function(req,res){
    res.sendFile(__dirname+'/test.html');

});
server.listen(8002);
